<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2018/5/26
  Time: 21:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>发布留言</title>
</head>
<body style="background-image: url(image/500500291.jpg); background-size: 100%;">
<div style="text-align:center;margin-top:120px">
    <h1 align="center">留下你的足迹！</h1>
<form accept-charset="UTF-8" method="post" action="userAddMessageHandler.jsp">

    <table style="margin-left:40%">

    姓名:<input type="text" name="username"><br/>
    标题:<input type="text" name="title"><br/>
    内容:<input type="text" name="information"><br/>

    <input type="submit" value="发表"><br/>
    </table>
</form>
</div>

<SCRIPT>
    function check()
    {
        var u = document.getElementById("username").value;
        if (u == null || u == "")
        {
            alert("用户名不能为空，请重新输入");
            return false;
        }
        var p = document.getElementById("information").value;
        if (p == null || p == "")
        {
            alert("内容不能为空");
            return false;
        }
    }
</SCRIPT>

</body>
</html>
